/*
  +----------------------------------------------------------------------+
  | PHP Version 5                                                        |
  +----------------------------------------------------------------------+
  | Copyright (c) 1997-2014 The PHP Group                                |
  +----------------------------------------------------------------------+
  | This source file is subject to version 3.01 of the PHP license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available through the world-wide-web at the following url:           |
  | http://www.php.net/license/3_01.txt                                  |
  | If you did not receive a copy of the PHP license and are unable to   |
  | obtain it through the world-wide-web, please send a note to          |
  | license@php.net so we can mail you a copy immediately.               |
  +----------------------------------------------------------------------+
  | Author:                                                              |
  +----------------------------------------------------------------------+
*/

#ifndef PHP_CCSW_H
#define PHP_CCSW_H


#define PHP_CCSW_VERSION "1.0.0"
#include "opencc.h"

extern zend_module_entry ccsw_module_entry;
#define phpext_counter_ptr &ccsw_module_entry


PHP_METHOD(ccsw, __construct);
PHP_METHOD(ccsw, __destruct);
PHP_METHOD(ccsw, convert);
PHP_METHOD(ccsw, error);



#ifdef PHP_WIN32
#    define PHP_CCSW_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
#    define PHP_CCSW_API __attribute__ ((visibility("default")))
#else
#    define PHP_CCSW_API
#endif

#ifdef ZTS
#define CCSW_G(v) TSRMG(ccsw_globals_id, zend_ccsw_globals *, v)
#else
#define CCSW_G(v) (ccsw_global.v)
#endif

#endif

